package cn.openea.perpartner.meily.web.mapper;

import cn.openea.perpartner.meily.web.entity.LearningCourse;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

/**
 * 学习课程
 * 
 * @author ysk
 * @email zane_ysk@qq.com
 * @date 2023-06-25 17:03:56
 */
@Mapper
public interface LearningCourseMapper extends BaseMapper<LearningCourse> {

    /**
     * 对大于该排序的视频进行降级
     * @param top 排序字段
     */
    @Update("UPDATE meily_learning_course SET top = top - 1 WHERE top > #{top}")
    void downgradeTop(Integer top);
}
